package codename.carrot.bomberman.views.widgets;

import sheep.gui.Widget;
import sheep.gui.WidgetAction;
import codename.carrot.bomberman.AppStorage.Direction;
import codename.carrot.bomberman.views.widgets.JoystickWidget.MoveState;
/**
 * Handles actions performed by the <code>JoystickWidget</code>
 * @author Group A4
 *
 */
public class JoysticWidgetAction extends WidgetAction{
	/**
	 * Start/stop command for the widget
	 */
	private MoveState moveState;
	/**
	 * Direction the widget is moving 
	 */
	private Direction direction;

	/**
	 * Class constructor. Creates widget-actions. 
	 * @param source - the widget that created the widget-action
	 * @param pushState - move state (start/stop)
	 * @param direction - direction the widget is moving
	 */
	public JoysticWidgetAction(Widget source, MoveState pushState, Direction direction) {
		super(source);
		this.moveState = pushState;
		this.direction = direction;
	}

	/**
	 * Getter for the widget's direction
	 * @return direction - the widget's direction
	 */
	public Direction getDirection(){
		return direction;
	}

	/**
	 * Getter for the widget's move state (start/stop)
	 * @return moveState - the widget's move state. 
	 */
	public MoveState getState(){
		return moveState;
	}
}
